import React from 'react';
import { Redirect } from 'umi';

const AuthRouter = (props) => {
  // 这个根据自己判断是否登录
  const isLogin = window.sessionStorage.getItem('token') ? true : false;
  return isLogin ? <Redirect to="/home/homePage" /> : <Redirect to="/login" />;
};

export default AuthRouter;
